OrderingLayer
OrderingLayer[] represents a net layer that effectively applies Ordering to its input.
OrderingLayer[n] gives the first n elements in the ordering of its input.
OrderingLayer[-n] gives the last n elements in the ordering of its input.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.